#include "Illumination.h"

Illumination::Illumination( float ar,float ag, float ab, float aa, float rr, float rg, float rb, float ra ,int ds, int local)
{
	ambient[0]=ar;
	ambient[1]=ag;
	ambient[2]=ab;
	ambient[3]=aa;
	background[0]=rr;
	background[1]=rg;
	background[2]=rb;
	background[3]=ra;

	doublesided=ds;
	this->local=local;
}

void Illumination::act()
{
	
	glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,doublesided);
	glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,local);
	glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
	glClearColor(background[0],background[1],background[2],background[3]);
}
